package com.example.practice.dao;

import com.example.practice.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
@Mapper
/**
 * (User)表数据库访问层
 *
 * @author makejava
 * @since 2023-12-20 19:13:55
 */
public interface UserDao {
    List<User> queryAllByLimit(User user);

    /**
     * 用ACCOUNT获取用户
     * @param account
     * @return
     */
    User getUserByAccount(@Param("account") String account);

    /**
     * 更改信息
     * @param user
     * @return
     */
    Integer updateUser(User user);

    User getName(@Param("id")Integer id);
    List<User> getCheckStudent(@Param("uid")Integer uid);

    User getByFid(@Param("fid")Integer fid);

    String getByUid(@Param("uid")Integer uid);

    List<User> getDistName();
    List<User> getUserByActivity(@Param("aid")Integer aid);
    Integer insertStudentSchool(@Param("uid")Integer uid,@Param("aid")Integer aid,@Param("sname") String sname);
    String selectStudentSchool(@Param("uid")Integer uid,@Param("aid")Integer aid);
    Integer saveUserUrl(@Param("uid")Integer uid,@Param("url")String url);
    String selectUserUrl(@Param("uid")Integer uid);
    Integer deleteStudentSchool(@Param("uid")Integer uid,@Param("aid")Integer aid);

    Integer insertUser(@Param("users") List<User> users);

    List<User> getAllUserBySid(@Param("sid") Integer sid);
    List<User> getAllUser();
}

